home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 235 < prev    next >
Internet Message Format  |  1996-08-06  |  2KB

  1. Path: rz.uni-karlsruhe.de!not-for-mail
  2. From: ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig)
  3. Newsgroups: comp.lang.c,comp.std.c
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Date: 30 Jan 1996 19:05:36 +0100
  6. Organization: =?ISO-8859-1?Q?Universit=E4t_Karlsruhe_(TH),_Germany_?=
  7. Message-ID: <4elmlg$154@fg70.rz.uni-karlsruhe.de>
  8. References: <30C40F77.53B5@swsbbs.com> <KANZE.96Jan29121956@slsvewt.lts.sel.alcatel.de> <TANMOY.96Jan29090518@qcd.lanl.gov> <KANZE.96Jan29201312@slsvewt.lts.sel.alcatel.de>
  9. Reply-To: Thomas.Koenig@ciw.uni-karlsruhe.de
  10. NNTP-Posting-Host: fg70.rz.uni-karlsruhe.de
  11. Mime-Version: 1.0
  12. Content-Type: text/plain; charset=iso-8859-1
  13. Content-Transfer-Encoding: 8bit
  14. NNTP-Posting-User: ig25
  15.  
  16. In comp.std.c, kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) wrote:
  17.  
  18. >Try naming a global function read, and see what happens (on most
  19. >compilers, anyway).  In fact, the Posix standard requires it, and
  20. >thus, you cannot be Posix compliant without encroaching upon the user
  21. >name space.
  22.  
  23. This can be solved by defining 'weak' symbols.  You can then have
  24. a C library, which calls the OS with __syscall_read(), and only bind
  25. this to the 'read' symbol if it's not overridden by the user.
  26.  
  27. The idea of weak symbols is so old (I think OS/360 had it) that
  28. even some modern Unices use it (Linux with ELF, for one).
  29. -- 
  30. Thomas Koenig, Thomas.Koenig@ciw.uni-karlsruhe.de, ig25@dkauni2.bitnet.
  31. The joy of engineering is to find a straight line on a double
  32. logarithmic diagram.
  33.